<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page isELIgnored="false"%>
<jsp:include page="../frame/header.jsp"></jsp:include>

<title>添加二手求购信息</title>
<style>
#picture{
	/*position:absolute;
	left:500px;
	top:350px;*/
}
#imgDiv div{
	margin-left:8px;
	margin-top:8px;
	position:relative;
}
.del-img{
	position:absolute;
	left:0px;
	top:0px;
	z-index:9999;
	cursor:pointer;
	display:none;
}
.gray {
	filter: grayscale(100%);
	-webkit-filter: grayscale(100%);
	-moz-filter: grayscale(100%);
	-ms-filter: grayscale(100%);
	-o-filter: grayscale(100%);
	filter: url(desaturate.svg#grayscale);
	filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
	-webkit-filter: grayscale(1);
}
</style>
</head>

<body>
	<div class="container-fluid">
		<div class="row-fluid">
			<div>
				<ul class="breadcrumb">
					<li><a href="#">实用功能</a> <span class="divider">/</span></li>
					<li><a href="#">二手交易</a></li>
				</ul>
			</div>

			<div class="box">
				<div class="box-header well" data-original-title>
					<h2>
						<i class="icon-edit"></i> 添加二手求购信息
					</h2>
					<div class="box-icon">
						<a href="#" class="btn btn-setting btn-round"><i
							class="icon-cog"></i></a> <a href="#"
							class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
						<a href="#" class="btn btn-close btn-round"><i
							class="icon-remove"></i></a>
					</div>
				</div>
				<div class="box-content">
					<form id="myform" class="form-horizontal" method="post" action="<c:url value="/admin/func/secondaryRequire" />">
						<fieldset>
							<input type="hidden" name="infoId" value="${secondary.infoId }">
							<div class="control-group">
												<label class="control-label" for="title">标题</label>
												<div class="controls">
													<input class="input-xlarge focused" name="title" check-type="required" required-message="请输入标题"
														id="title" type="text" value="${secondary.title }" maxlength="100"
														>
												</div>
											</div>
											
										
											<div class="control-group">
												<label class="control-label" for="linkName">联系人</label>
												<div class="controls">
													<input class="input-xlarge" id="linkName" name="linkName" type="text"
														value="${secondary.linkName }" check-type="required" required-message="请输入联系人">
												</div>
											</div>
											<div class="control-group">
												<label class="control-label" for="phone">联系电话</label>
												<div class="controls">
													<input class="input-xlarge" id="phone" name="phone" type="text"
														value="${secondary.phone }" check-type="required" required-message="请输入联系电话">
												</div>
											</div>
											
				
											
											<div class="control-group">
												<label class="control-label" for="publishValidateDate">有效期至</label>
												<div class="controls">
													<input class="input-xlarge datepicker" placeholder="默认为30天" 
													id="publishValidateDate" name="publishValidateDate" type="text">
												</div>
											</div>
											<div class="control-group">
												<label class="control-label" for="description_mc">详细描述</label>
												<div class="controls">
													<textarea id="description_mc" name="description_mc" rows="18" check-type="required" required-message="请输入详细描述"
														 class="" style="height:300px;width: 80%">${secondary.description_mc }</textarea>
												</div>
											</div>
							
							
							<div class="form-actions">		
								
								<button id="saveBtn" type="button" class="btn btn-primary">保存</button>
								<button id="cancelBtn" type="button" class="btn">返回</button>
							</div>
						</fieldset>
					</form>

				</div>
			</div>
			<!--/span-->

		</div>
	</div>
	<!--/row-->
</body>

<jsp:include page="../frame/scripts.jsp"></jsp:include>
<script type="text/javascript">

var images = new Array();

$(document).ready(function(){
	$('#cancelBtn').click(function(){
		window.location.href = '<c:url value="/admin/func/secondaryRequire" />';	
	})
	
	$("#myform").validation();
	
	//保存
	$('#saveBtn').click(function(){
		
		$("#myform").submit();
	})
	//xheditor 文件上传
	$('#description_mc').xheditor({
		tools:'full',
		skin:'default',
		upMultiple:1,
		html5Upload:false,
		upImgUrl:'<c:url value="/xheditor/fileupload"/>',
		upImgExt:'jpg,png,jpeg,gif,bmp',
		onUpload:function(data){
			
		}
	})
	
})


</script>